feat: add kawai logo in npmx.dev homepage#2346
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
2 Skipped Deployments
|
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughThe 🚥 Pre-merge checks | ✅ 1✅ Passed checks (1 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
app/pages/index.vue (1)
43-43: Simplify boolean conditions for readability.The mixed
=== true/!== truechecks work, but they add noise. Using direct booleans (andv-else) makes the template easier to scan.♻️ Suggested simplification
- <img - v-if="isKawaii === true" + <img + v-if="isKawaii" width="400" class="pb-8 motion-safe:animate-fade-in motion-safe:hover:scale-105 motion-safe:transition" src="/extra/npmx-cute.svg" alt="npmx kawaii logo" /> - <AppLogo v-if="isKawaii !== true" class="w-42 h-auto sm:w-58 md:w-70" /> + <AppLogo v-else class="w-42 h-auto sm:w-58 md:w-70" /> <span - v-if="isKawaii !== true" + v-if="!isKawaii" aria-hidden="true" class="text-sm sm:text-base md:text-lg transform-origin-br font-mono tracking-widest text-accent absolute -bottom-4 -inset-ie-1.5" > @@ - <p - v-if="isKawaii !== true" + <p + v-if="!isKawaii" class="text-fg-muted text-lg sm:text-xl max-w-xl mb-12 lg:mb-14 motion-safe:animate-slide-up motion-safe:animate-fill-both" style="animation-delay: 0.1s" >Also applies to: 49-49, 51-51, 60-60
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: f63adce0-831f-4aec-bfd5-141651ab73dd
⛔ Files ignored due to path filters (1)
public/extra/npmx-cute.svgis excluded by!**/*.svg
📒 Files selected for processing (1)
app/pages/index.vue
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
Update app/pages/index.vue Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
app/pages/index.vue (1)
34-45: Rename the queried env element so it no longer shadowsenv.
envalready means the build environment in this file, so reusing it for a DOM node makes the prehydrate block harder to read and keeps the shadowing warning alive.Suggested fix
- const env = el.querySelector('#npmx-index-h1-logo-env') as HTMLElement + const envBadge = el.querySelector('#npmx-index-h1-logo-env') as HTMLElement const tagline = el.querySelector('#npmx-index-tagline') as HTMLElement - if (!normal || !kawaii || !env || !tagline) return + if (!normal || !kawaii || !envBadge || !tagline) return if (isKawaii) { normal.style.display = 'none' kawaii.style.display = 'block' - env.style.display = 'none' + envBadge.style.display = 'none' tagline.style.display = 'none' } else { normal.style.display = 'block' kawaii.style.display = 'none' - env.style.display = 'block' + envBadge.style.display = 'block' tagline.style.display = 'block' }As per coding guidelines,
**/*.{ts,tsx,vue}: Use clear, descriptive variable and function names.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: dceb0402-8249-4103-9bb7-7a618e45069f
📒 Files selected for processing (1)
app/pages/index.vue
|
Ok I made some changes:
Questions:
|
There was a problem hiding this comment.
Actionable comments posted: 1
♻️ Duplicate comments (1)
app/pages/index.vue (1)
67-67:⚠️ Potential issue | 🟡 MinorLocalise the logo alt text.
The alt text is still hard-coded in English on Line 67. Use an i18n token so it follows the active locale.
Suggested patch
- alt="npmx kawaii logo" + :alt="$t('home.logo_kawaii_alt')"Please add the new key in locale files (including
en.jsonandid-ID.jsonif you’re updating both in this PR). Based on learnings: in this Nuxt i18n setup,$t()is auto-exposed and should be used directly.
🧹 Nitpick comments (1)
app/pages/index.vue (1)
28-29: Remove stale commented code.Line 28-Line 29 keep dead commented logic in the component. Please delete these lines before merge.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 0261a588-9568-4219-8bfa-ba292a1723b4
📒 Files selected for processing (1)
app/pages/index.vue
Lunaria Status Overview🌕 This pull request will trigger status changes. Learn moreBy default, every PR changing files present in the Lunaria configuration's You can change this by adding one of the keywords present in the Tracked Files
Warnings reference
|
🧭 Context
April fools is coming up, something fun needs to be done. I present to you a kawaii variant of the npmx home page.
📚 Description
?kawai=trueis detected in index.vue using window.location.search<img>stored in /public/extraDiscussion:
https://discord.com/channels/1464542801676206113/1486838820556116051/1488491068285522021